<template>
  <div>
    <div class="outer">
      <h2>List</h2>
      <button @click="sendHandel">向父组件发送数据</button>
    </div>
  </div>
</template>

<script>
export default {
  name: "List",
  data(){
    return{
        list:[
            {name:'laowang',age:18},
            {name:'xiaowang',age:19},
            {name:'zhongwang',age:28},
            {name:'wangzhongwang',age:38},
        ]
    }
  },
  methods:{
    sendHandel(){
        this.$emit('atguigu',this.list)
    }
  }
};
</script>

<style scoped>
.outer {
  height: 200px;
  margin: 30px;
  background: pink;
}
</style>
